#ifndef ARP_SUB_CONTROLL_ITEM_H
#define ARP_SUB_CONTROLL_ITEM_H

#include <subControllItem.h>
#include <viewConf.h>
#include <iconButton.h>
#include <broadcast.h>
#include <messageDialog.h>
#include <netAddressChecker.h>

namespace View {

  class ArpSubControllItem;
      
  class ArpAttackButton : public IconButton
  {
    bool buttonType; // true means play , false means pause
    ArpSubControllItem *arpControll;
  public:
  ArpAttackButton(GooCanvasItem * newParent,
		  gdouble x,gdouble y,
		  GdkPixbuf *bg,GdkPixbuf *mg,GdkPixbuf *fg,
		  bool newButtonType,ArpSubControllItem *newArpControll)
    :IconButton(newParent,x,y,bg,mg,fg),
      buttonType(newButtonType),
      arpControll(newArpControll)
      {}
    virtual bool OnClicked();
  };

  class ArpSubControllItem : public SubControllItem
  {
    GtkWidget *srcIP;
    GtkWidget *srcMAC;
    GtkWidget *dstIP;
    GtkWidget *dstMAC;
    GtkWidget *attackTimes;

    //for change language, so create these ..
    GooCanvasItem *pleaseInputArpMsg;
    GooCanvasItem *AIP;
    GooCanvasItem *AMAC;
    GooCanvasItem *BIP;
    GooCanvasItem *BMAC;

    IconButton *play;
    IconButton *pause;

  public:
    ArpSubControllItem(GooCanvasItem *parent);
    ~ArpSubControllItem();

    virtual int OnReceive(Controller::Broadcast *broadcast);
    virtual bool SendAllAddress();
    virtual bool CheckInputData();
  };

}

#endif
